home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1993 July / Internet Tools.iso / RockRidge / mail / pine / pine3.07 / c-client / mh.h < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-29  |  3.8 KB  |  138 lines

  1. /*
  2.  * Program:    MH mail routines
  3.  *
  4.  * Author(s):    Mark Crispin
  5.  *        Networks and Distributed Computing
  6.  *        Computing & Communications
  7.  *        University of Washington
  8.  *        Administration Building, AG-44
  9.  *        Seattle, WA  98195
  10.  *        Internet: MRC@CAC.Washington.EDU
  11.  *
  12.  *        Andrew Cohen
  13.  *        Internet: cohen@bucrf16.bu.edu
  14.  *
  15.  * Date:    23 February 1992
  16.  * Last Edited:    21 April 1992
  17.  *
  18.  * Copyright 1992 by the University of Washington
  19.  *
  20.  *  Permission to use, copy, modify, and distribute this software and its
  21.  * documentation for any purpose and without fee is hereby granted, provided
  22.  * that the above copyright notice appears in all copies and that both the
  23.  * above copyright notice and this permission notice appear in supporting
  24.  * documentation, and that the name of the University of Washington not be
  25.  * used in advertising or publicity pertaining to distribution of the software
  26.  * without specific, written prior permission.  This software is made
  27.  * available "as is", and
  28.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  29.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  30.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  31.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  32.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  33.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  34.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  35.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  36.  *
  37.  */
  38.  
  39. /* Build parameters */
  40.  
  41. #define MHRC strcat (strcpy (tmp,getpwuid (geteuid ())->pw_dir),"/.mhrc")
  42.  
  43. /* Externals */
  44.  
  45. extern char *months[];
  46.  
  47.  
  48. /* Command bits from mh_getflags() */
  49.  
  50. #define fSEEN 1
  51. #define fDELETED 2
  52. #define fFLAGGED 4
  53. #define fANSWERED 8
  54.  
  55.  
  56. /* MH I/O stream local data */
  57.  
  58. typedef struct mh_local {
  59.   unsigned int dirty : 1;    /* disk copy of .mhrc needs updating */
  60.   char *host;            /* local host name */
  61.   char *dir;            /* spool directory name */
  62.   char *buf;            /* temporary buffer */
  63.   unsigned long buflen;        /* current size of temporary buffer */
  64.   unsigned long *number;    /* mh message numbers */
  65.   char **header;        /* message headers */
  66.   char **body;            /* message bodies */
  67.   long *date;            /* message dates */
  68.   char *seen;            /* local seen status */
  69. } MHLOCAL;
  70.  
  71.  
  72. /* Convenient access to local data */
  73.  
  74. #define LOCAL ((MHLOCAL *) stream->local)
  75.  
  76. /* Function prototypes */
  77.  
  78. DRIVER *mh_valid  ();
  79. void mh_find  ();
  80. char *mh_file  ();
  81. void mh_find_bboards  ();
  82. MAILSTREAM *mh_open  ();
  83. int mh_select  ();
  84. int mh_numsort  ();
  85. void mh_close  ();
  86. void mh_fetchfast  ();
  87. void mh_fetchflags  ();
  88. ENVELOPE *mh_fetchenvelope  ();
  89. char *mh_fetchheader  ();
  90. char *mh_fetchtext  ();
  91. char *mh_fetchbody  ();
  92. void mh_setflag  ();
  93. void mh_clearflag  ();
  94. void mh_search  ();
  95. long mh_ping  ();
  96. void mh_check  ();
  97. void mh_expunge  ();
  98. long mh_copy  ();
  99. long mh_move  ();
  100. void mh_gc  ();
  101. short mh_getflags  ();
  102. char mh_search_all  ();
  103. char mh_search_answered  ();
  104. char mh_search_deleted  ();
  105. char mh_search_flagged  ();
  106. char mh_search_keyword  ();
  107. char mh_search_new  ();
  108. char mh_search_old  ();
  109. char mh_search_recent  ();
  110. char mh_search_seen  ();
  111. char mh_search_unanswered  ();
  112. char mh_search_undeleted  ();
  113. char mh_search_unflagged  ();
  114. char mh_search_unkeyword  ();
  115. char mh_search_unseen  ();
  116. char mh_search_before  ();
  117. char mh_search_on  ();
  118. char mh_search_since  ();
  119. unsigned long mh_msgdate  ();
  120. char mh_search_body  ();
  121. char mh_search_subject  ();
  122. char mh_search_text  ();
  123. char mh_search_bcc  ();
  124. char mh_search_cc  ();
  125. char mh_search_from  ();
  126. char mh_search_to  ();
  127. typedef char (*search_t)  ();
  128. search_t mh_search_date  ();
  129. long mh_date  ();
  130. search_t mh_search_flag  ();
  131. search_t mh_search_string  ();
  132.  
  133. /* This is embarassing */
  134.  
  135. extern char *bezerk_file  ();
  136. extern int bezerk_lock  ();
  137. extern void bezerk_unlock  ();
  138.